home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / pgm_ctrl / cuactrls / ctoolbar.frm < prev    next >
Text File  |  1995-05-22  |  18KB  |  562 lines

  1. VERSION 2.00
  2. Begin Form frmToolBar 
  3.    Caption         =   "Tool Bar Demo"
  4.    ClientHeight    =   1215
  5.    ClientLeft      =   75
  6.    ClientTop       =   855
  7.    ClientWidth     =   9705
  8.    ClipControls    =   0   'False
  9.    Height          =   1620
  10.    Icon            =   CTOOLBAR.FRX:0000
  11.    Left            =   15
  12.    LinkTopic       =   "Form3"
  13.    ScaleHeight     =   1215
  14.    ScaleWidth      =   9705
  15.    Top             =   510
  16.    Width           =   9825
  17.    Begin CUACommand cmdOK 
  18.       Caption         =   "OK"
  19.       Default         =   -1  'True
  20.       Height          =   345
  21.       Left            =   8400
  22.       StandardButton  =   1  'OK
  23.       TabIndex        =   43
  24.       Top             =   855
  25.       Width           =   1260
  26.    End
  27.    Begin CUAToolButton tbnWord 
  28.       ButtonSource    =   1  'Custom
  29.       CustomCount     =   20
  30.       Height          =   330
  31.       Index           =   20
  32.       Left            =   7410
  33.       StandardButton  =   7  'Print
  34.       TabIndex        =   42
  35.       Top             =   30
  36.       Width           =   360
  37.    End
  38.    Begin CUAToolTips tip1 
  39.       BackColor       =   &H0080FFFF&
  40.       Caption         =   "ToolTips"
  41.       FontBold        =   0   'False
  42.       FontItalic      =   0   'False
  43.       FontName        =   "MS Sans Serif"
  44.       FontSize        =   8.25
  45.       FontStrikethru  =   0   'False
  46.       FontUnderline   =   0   'False
  47.       Height          =   255
  48.       Left            =   3885
  49.       TabIndex        =   41
  50.       Top             =   870
  51.       Width           =   825
  52.    End
  53.    Begin PictureBox picTool 
  54.       AutoSize        =   -1  'True
  55.       Height          =   255
  56.       Left            =   3675
  57.       Picture         =   CTOOLBAR.FRX:0302
  58.       ScaleHeight     =   225
  59.       ScaleWidth      =   4800
  60.       TabIndex        =   12
  61.       Top             =   870
  62.       Visible         =   0   'False
  63.       Width           =   4830
  64.    End
  65.    Begin CUAStatus sts2 
  66.       Align           =   1  'Align Top
  67.       BackColor       =   &H00C0C0C0&
  68.       ClipControls    =   0   'False
  69.       Height          =   405
  70.       Left            =   0
  71.       TabIndex        =   11
  72.       Top             =   0
  73.       Width           =   9705
  74.       Begin CUAToolButton tbnWord 
  75.          ButtonSource    =   1  'Custom
  76.          CustomCount     =   20
  77.          Height          =   330
  78.          Index           =   14
  79.          Left            =   8535
  80.          TabIndex        =   14
  81.          Top             =   30
  82.          Width           =   360
  83.       End
  84.       Begin CUAToolButton tbnWord 
  85.          ButtonSource    =   1  'Custom
  86.          CustomCount     =   20
  87.          Height          =   330
  88.          Index           =   13
  89.          Left            =   8190
  90.          TabIndex        =   15
  91.          Top             =   30
  92.          Width           =   360
  93.       End
  94.       Begin CUAToolButton tbnWord 
  95.          ButtonSource    =   1  'Custom
  96.          CustomCount     =   20
  97.          Height          =   330
  98.          Index           =   12
  99.          Left            =   7845
  100.          TabIndex        =   16
  101.          Top             =   30
  102.          Width           =   360
  103.       End
  104.       Begin CUAToolButton tbnWord 
  105.          ButtonSource    =   1  'Custom
  106.          CustomCount     =   20
  107.          Height          =   330
  108.          Index           =   11
  109.          Left            =   7065
  110.          TabIndex        =   17
  111.          Top             =   30
  112.          Width           =   360
  113.       End
  114.       Begin CUAToolButton tbnWord 
  115.          ButtonSource    =   1  'Custom
  116.          CustomCount     =   20
  117.          Height          =   330
  118.          Index           =   10
  119.          Left            =   6585
  120.          TabIndex        =   18
  121.          Top             =   30
  122.          Width           =   360
  123.       End
  124.       Begin CUAToolButton tbnWord 
  125.          ButtonSource    =   1  'Custom
  126.          CustomCount     =   20
  127.          Height          =   330
  128.          Index           =   9
  129.          Left            =   6135
  130.          TabIndex        =   19
  131.          Top             =   30
  132.          Width           =   360
  133.       End
  134.       Begin CUAToolButton tbnWord 
  135.          ButtonSource    =   1  'Custom
  136.          CustomCount     =   20
  137.          Height          =   330
  138.          Index           =   8
  139.          Left            =   5790
  140.          TabIndex        =   20
  141.          Top             =   30
  142.          Width           =   360
  143.       End
  144.       Begin CUAToolButton tbnWord 
  145.          ButtonSource    =   1  'Custom
  146.          CustomCount     =   20
  147.          Height          =   330
  148.          Index           =   7
  149.          Left            =   5445
  150.          TabIndex        =   21
  151.          Top             =   30
  152.          Width           =   360
  153.       End
  154.       Begin CUAToolButton tbnWord 
  155.          ButtonSource    =   1  'Custom
  156.          CustomCount     =   20
  157.          Height          =   330
  158.          Index           =   6
  159.          Left            =   5100
  160.          TabIndex        =   22
  161.          Top             =   30
  162.          Width           =   360
  163.       End
  164.       Begin CUAToolButton tbnWord 
  165.          ButtonSource    =   1  'Custom
  166.          CustomCount     =   20
  167.          Height          =   330
  168.          Index           =   5
  169.          Left            =   4755
  170.          TabIndex        =   23
  171.          Top             =   30
  172.          Width           =   360
  173.       End
  174.       Begin CUAToolButton tbnWord 
  175.          ButtonSource    =   1  'Custom
  176.          CustomCount     =   20
  177.          Height          =   330
  178.          Index           =   4
  179.          Left            =   4290
  180.          TabIndex        =   24
  181.          Top             =   30
  182.          Width           =   360
  183.       End
  184.       Begin CUAToolButton tbnWord 
  185.          ButtonSource    =   1  'Custom
  186.          CustomCount     =   20
  187.          Height          =   330
  188.          Index           =   3
  189.          Left            =   3945
  190.          TabIndex        =   25
  191.          Top             =   30
  192.          Width           =   360
  193.       End
  194.       Begin CUAToolButton tbnWord 
  195.          ButtonSource    =   1  'Custom
  196.          CustomCount     =   20
  197.          Height          =   330
  198.          Index           =   2
  199.          Left            =   3600
  200.          TabIndex        =   26
  201.          Top             =   30
  202.          Width           =   360
  203.       End
  204.       Begin CUAToolButton tbnWord 
  205.          ButtonSource    =   1  'Custom
  206.          CustomButton    =   3
  207.          CustomCount     =   20
  208.          Height          =   330
  209.          Index           =   1
  210.          Left            =   3255
  211.          TabIndex        =   27
  212.          Top             =   30
  213.          Width           =   360
  214.       End
  215.       Begin CUAToolButton tbnWord 
  216.          ButtonSource    =   1  'Custom
  217.          CustomButton    =   2
  218.          CustomCount     =   20
  219.          Height          =   330
  220.          Index           =   0
  221.          Left            =   2910
  222.          TabIndex        =   28
  223.          Top             =   30
  224.          Width           =   360
  225.       End
  226.       Begin CUAToolButton tbn1 
  227.          Height          =   330
  228.          Index           =   6
  229.          Left            =   2430
  230.          StandardButton  =   12  'Undo
  231.          TabIndex        =   6
  232.          Top             =   30
  233.          Width           =   360
  234.       End
  235.       Begin CUAToolButton tbn1 
  236.          Height          =   330
  237.          Index           =   5
  238.          Left            =   1965
  239.          StandardButton  =   11  'Paste
  240.          TabIndex        =   5
  241.          Top             =   30
  242.          Width           =   360
  243.       End
  244.       Begin CUAToolButton tbn1 
  245.          Height          =   330
  246.          Index           =   4
  247.          Left            =   1620
  248.          StandardButton  =   10  'Copy
  249.          TabIndex        =   4
  250.          Top             =   30
  251.          Width           =   360
  252.       End
  253.       Begin CUAToolButton tbn1 
  254.          Height          =   330
  255.          Index           =   3
  256.          Left            =   1275
  257.          StandardButton  =   9  'Cut
  258.          TabIndex        =   3
  259.          Top             =   30
  260.          Width           =   360
  261.       End
  262.       Begin CUAToolButton tbn1 
  263.          Enabled         =   0   'False
  264.          Height          =   330
  265.          Index           =   2
  266.          Left            =   795
  267.          StandardButton  =   6  'Save
  268.          TabIndex        =   2
  269.          Top             =   30
  270.          Width           =   360
  271.       End
  272.       Begin CUAToolButton tbn1 
  273.          Height          =   330
  274.          Index           =   1
  275.          Left            =   450
  276.          StandardButton  =   5  'Open
  277.          TabIndex        =   1
  278.          Top             =   30
  279.          Width           =   360
  280.       End
  281.       Begin CUAToolButton tbn1 
  282.          Height          =   330
  283.          Index           =   0
  284.          Left            =   105
  285.          StandardButton  =   4  'New
  286.          TabIndex        =   0
  287.          Top             =   30
  288.          Width           =   360
  289.       End
  290.    End
  291.    Begin CUAStatus sts1 
  292.       Align           =   1  'Align Top
  293.       BackColor       =   &H00C0C0C0&
  294.       ClipControls    =   0   'False
  295.       Height          =   405
  296.       Left            =   0
  297.       TabIndex        =   7
  298.       Top             =   405
  299.       Width           =   9705
  300.       Begin CUAToolButton tbnWord 
  301.          ButtonSource    =   1  'Custom
  302.          ButtonType      =   1  'Attribute
  303.          CustomCount     =   20
  304.          Height          =   330
  305.          Index           =   19
  306.          Left            =   9090
  307.          TabIndex        =   29
  308.          Top             =   30
  309.          Width           =   360
  310.       End
  311.       Begin CUAToolButton tbnWord 
  312.          ButtonSource    =   1  'Custom
  313.          ButtonType      =   1  'Attribute
  314.          CustomCount     =   20
  315.          Height          =   330
  316.          Index           =   18
  317.          Left            =   8640
  318.          TabIndex        =   30
  319.          Top             =   30
  320.          Width           =   360
  321.       End
  322.       Begin CUAToolButton tbnWord 
  323.          ButtonSource    =   1  'Custom
  324.          ButtonType      =   1  'Attribute
  325.          CustomCount     =   20
  326.          Height          =   330
  327.          Index           =   17
  328.          Left            =   8295
  329.          TabIndex        =   31
  330.          Top             =   30
  331.          Width           =   360
  332.       End
  333.       Begin CUAToolButton tbnWord 
  334.          ButtonSource    =   1  'Custom
  335.          ButtonType      =   1  'Attribute
  336.          CustomCount     =   20
  337.          Height          =   330
  338.          Index           =   16
  339.          Left            =   7950
  340.          TabIndex        =   32
  341.          Top             =   30
  342.          Width           =   360
  343.       End
  344.       Begin CUAToolButton tbnWord 
  345.          ButtonSource    =   1  'Custom
  346.          ButtonType      =   1  'Attribute
  347.          CustomCount     =   20
  348.          Height          =   330
  349.          Index           =   15
  350.          Left            =   7605
  351.          TabIndex        =   33
  352.          Top             =   30
  353.          Value           =   1  'Down
  354.          Width           =   360
  355.       End
  356.       Begin CUAToolButton tbnJust 
  357.          ButtonType      =   1  'Attribute
  358.          Height          =   330
  359.          Index           =   3
  360.          Left            =   7155
  361.          StandardButton  =   34  'Just
  362.          TabIndex        =   34
  363.          Top             =   30
  364.          Width           =   360
  365.       End
  366.       Begin CUAToolButton tbnJust 
  367.          ButtonType      =   1  'Attribute
  368.          Height          =   330
  369.          Index           =   2
  370.          Left            =   6810
  371.          StandardButton  =   37  'Right
  372.          TabIndex        =   35
  373.          Top             =   30
  374.          Width           =   360
  375.       End
  376.       Begin CUAToolButton tbnJust 
  377.          ButtonType      =   1  'Attribute
  378.          Height          =   330
  379.          Index           =   1
  380.          Left            =   6465
  381.          StandardButton  =   36  'Center
  382.          TabIndex        =   36
  383.          Top             =   30
  384.          Width           =   360
  385.       End
  386.       Begin CUAToolButton tbnJust 
  387.          ButtonType      =   1  'Attribute
  388.          Height          =   330
  389.          Index           =   0
  390.          Left            =   6120
  391.          StandardButton  =   35  'Left
  392.          TabIndex        =   37
  393.          Top             =   30
  394.          Value           =   1  'Down
  395.          Width           =   360
  396.       End
  397.       Begin CUACombo cbo3 
  398.          BorderStyle     =   3  'Inset
  399.          Height          =   300
  400.          Left            =   4080
  401.          TabIndex        =   10
  402.          Text            =   "10"
  403.          Top             =   45
  404.          Width           =   765
  405.       End
  406.       Begin CUACombo cbo2 
  407.          BorderStyle     =   3  'Inset
  408.          Height          =   300
  409.          Left            =   1905
  410.          TabIndex        =   9
  411.          Text            =   "Times New Roman"
  412.          Top             =   45
  413.          Width           =   2070
  414.       End
  415.       Begin CUACombo cbo1 
  416.          BorderStyle     =   3  'Inset
  417.          Height          =   300
  418.          Left            =   90
  419.          TabIndex        =   8
  420.          Text            =   "Normal"
  421.          Top             =   45
  422.          Width           =   1725
  423.       End
  424.       Begin CUAToolButton tbnFontAttr 
  425.          ButtonType      =   1  'Attribute
  426.          Height          =   330
  427.          Index           =   2
  428.          Left            =   5640
  429.          StandardButton  =   40  'Under
  430.          TabIndex        =   38
  431.          Top             =   30
  432.          Width           =   360
  433.       End
  434.       Begin CUAToolButton tbnFontAttr 
  435.          ButtonType      =   1  'Attribute
  436.          Height          =   330
  437.          Index           =   1
  438.          Left            =   5295
  439.          StandardButton  =   39  'Italic
  440.          TabIndex        =   39
  441.          Top             =   30
  442.          Width           =   360
  443.       End
  444.       Begin CUAToolButton tbnFontAttr 
  445.          ButtonType      =   1  'Attribute
  446.          Height          =   330
  447.          Index           =   0
  448.          Left            =   4950
  449.          StandardButton  =   38  'Bold
  450.          TabIndex        =   40
  451.          Top             =   30
  452.          Width           =   360
  453.       End
  454.    End
  455.    Begin CUALabel lbl1 
  456.       Caption         =   "This is an example of the tool bar in Word 2.0."
  457.       FontBold        =   0   'False
  458.       FontItalic      =   0   'False
  459.       FontName        =   "MS Sans Serif"
  460.       FontSize        =   8.25
  461.       FontStrikethru  =   0   'False
  462.       FontUnderline   =   0   'False
  463.       ForeColor       =   &H00000080&
  464.       Height          =   195
  465.       Left            =   120
  466.       TabIndex        =   13
  467.       Top             =   900
  468.       Width           =   3480
  469.    End
  470. End
  471. Option Explicit
  472.  
  473. Sub cmdOK_Click ()
  474.    Unload Me
  475. End Sub
  476.  
  477. Sub Form_Load ()
  478.    Dim I%
  479.  
  480.    For I = 0 To 19
  481.       tbnWord(I).Picture = picTool
  482.       tbnWord(I).CustomCount = 20
  483.       tbnWord(I).CustomButton = I + 1
  484.    Next
  485. End Sub
  486.  
  487. Sub tbnJust_Click (Index As Integer)
  488.    Dim I%
  489.    For I = 0 To 3
  490.       If I <> Index Then tbnJust(I).Value = 0
  491.    Next
  492. End Sub
  493.  
  494. Sub tip1_NeedText (hWnd As Integer, ToolText As String)
  495.    Select Case hWnd
  496.       Case tbn1(0).hWnd
  497.          ToolText = "New"
  498.       Case tbn1(1).hWnd
  499.          ToolText = "Open"
  500.       Case tbn1(2).hWnd
  501.          ToolText = "Save"
  502.       Case tbn1(3).hWnd
  503.          ToolText = "Cut"
  504.       Case tbn1(4).hWnd
  505.          ToolText = "Copy"
  506.       Case tbn1(5).hWnd
  507.          ToolText = "Paste"
  508.       Case tbn1(6).hWnd
  509.          ToolText = "Undo"
  510.       
  511.       Case tbnFontAttr(0).hWnd
  512.          ToolText = "Bold"
  513.       Case tbnFontAttr(1).hWnd
  514.          ToolText = "Italic"
  515.       Case tbnFontAttr(2).hWnd
  516.          ToolText = "Underline"
  517.    
  518.       Case tbnJust(0).hWnd
  519.          ToolText = "Left"
  520.       Case tbnJust(1).hWnd
  521.          ToolText = "Center"
  522.       Case tbnJust(2).hWnd
  523.          ToolText = "Right"
  524.       Case tbnJust(3).hWnd
  525.          ToolText = "Margin"
  526.    
  527.       Case tbnWord(0).hWnd
  528.          ToolText = "Reverses the last action"
  529.       Case tbnWord(1).hWnd
  530.          ToolText = "Creates a numbered list based on the current defaults"
  531.       Case tbnWord(2).hWnd
  532.          ToolText = "Creates a bulleted list based on the current defaults"
  533.       Case tbnWord(3).hWnd
  534.          ToolText = "Moves the left indent to the previous tab stop"
  535.       Case tbnWord(4).hWnd
  536.          ToolText = "Moves the left indent to the next tab stop"
  537.       Case tbnWord(5).hWnd
  538.          ToolText = "Inserts a table"
  539.       Case tbnWord(6).hWnd
  540.          ToolText = "Changes the column format within the sections"
  541.       Case tbnWord(7).hWnd
  542.          ToolText = "Inserts an empty frame or frames the selected text"
  543.       Case tbnWord(8).hWnd
  544.          ToolText = "Inserts a Microsoft Draw object"
  545.       Case tbnWord(9).hWnd
  546.          ToolText = "Inserts a Microsoft Graph object"
  547.       Case tbnWord(10).hWnd
  548.          ToolText = "Creates an envelope that will print along with the current document"
  549.       Case tbnWord(11).hWnd
  550.          ToolText = "Checks the spelling in the active document"
  551.       Case tbnWord(12).hWnd
  552.          ToolText = "Prints the active document using the current defaults"
  553.       Case tbnWord(13).hWnd
  554.          ToolText = "Scales the editing view to see the whole page in Page Layout view"
  555.       Case tbnWord(14).hWnd
  556.          ToolText = "Scales the editing view to 100% in Normal view"
  557.       Case tbnWord(15).hWnd
  558.          ToolText = "Scales the editing view to see the width of the page"
  559.    End Select
  560. End Sub
  561.  
  562.